
     function addRow(tableID) {
            var table = document.getElementById(tableID);
            var rowCount = table.rows.length;
            var row = table.insertRow(rowCount);
            var cell1 = row.insertCell(0);
            var element1 = document.createElement("input");
            element1.type = "checkbox";
            cell1.appendChild(element1);
           
		  
			rowCount= rowCount + 1;

            var cell2 = row.insertCell(1);
			var element2 = document.createElement("input");
			element2.type = "text";
            cell2.appendChild(element2);

			var cell3 = row.insertCell(2);
			var element3 = document.createElement("select");
			element3.name='sel';
			element3.options[0] = new Option('TextField','TextField');
			element3.options[1] = new Option('Radio','Radio');
			element3.options[2] = new Option('CheckBox','CheckBox');
			element3.options[3] = new Option('SelectList','SelectList');
			element3.options[4] = new Option('Hidden','Hidden');
			element3.options[5] = new Option('Parameter','Param');
            cell3.appendChild(element3);
            
            


 

        }

 

        function deleteRow(tableID) {

            try {

            var table = document.getElementById(tableID);

            var rowCount = table.rows.length;

 

            for(var i=0; i<rowCount; i++) {

                var row = table.rows[i];

                var chkbox = row.cells[0].childNodes[0];

                if(null != chkbox && true == chkbox.checked) {

                    table.deleteRow(i);

                    rowCount--;

                    i--;

                }

 

            }

            }catch(e) {

               alert(e);

            }
        }

 

